$OpenBSD: patch-mono_utils_mono-proclib_c,v 1.16 2015/04/04 15:56:18 robert Exp $
--- mono/utils/mono-proclib.c.orig	Sat Apr  4 12:30:47 2015
+++ mono/utils/mono-proclib.c	Sat Apr  4 12:33:03 2015
@@ -56,30 +56,30 @@ mono_process_list (int *size)
 {
 #if USE_SYSCTL
 	int res, i;
-#ifdef KERN_PROC2
+#ifdef KERN_PROC
 	int mib [6];
-	size_t data_len = sizeof (struct kinfo_proc2) * 400;
-	struct kinfo_proc2 *processes = malloc (data_len);
+	size_t data_len = sizeof (struct kinfo_proc) * 400;
+	struct kinfo_proc *processes = malloc (data_len);
 #else
 	int mib [4];
 	size_t data_len = sizeof (struct kinfo_proc) * 16;
 	struct kinfo_proc *processes;
 	int limit = 8;
-#endif /* KERN_PROC2 */
+#endif /* KERN_PROC */
 	void **buf = NULL;
 
 	if (size)
 		*size = 0;
 
-#ifdef KERN_PROC2
+#ifdef KERN_PROC
 	if (!processes)
 		return NULL;
 
 	mib [0] = CTL_KERN;
-	mib [1] = KERN_PROC2;
+	mib [1] = KERN_PROC;
 	mib [2] = KERN_PROC_ALL;
 	mib [3] = 0;
-	mib [4] = sizeof(struct kinfo_proc2);
+	mib [4] = sizeof(struct kinfo_proc);
 	mib [5] = 400; /* XXX */
 
 	res = sysctl (mib, 6, processes, &data_len, NULL, 0);
@@ -109,13 +109,13 @@ mono_process_list (int *size)
 			break;
 		}
 	}
-#endif /* KERN_PROC2 */
+#endif /* KERN_PROC */
 
-#ifdef KERN_PROC2
-	res = data_len/sizeof (struct kinfo_proc2);
+#ifdef KERN_PROC
+	res = data_len/sizeof (struct kinfo_proc);
 #else
 	res = data_len/sizeof (struct kinfo_proc);
-#endif /* KERN_PROC2 */
+#endif /* KERN_PROC */
 	buf = g_realloc (buf, res * sizeof (void*));
 	for (i = 0; i < res; ++i)
 		buf [i] = GINT_TO_POINTER (processes [i].kinfo_pid_member);
@@ -213,29 +213,29 @@ mono_process_get_name (gpointer pid, char *buf, int le
 {
 #if USE_SYSCTL
 	int res;
-#ifdef KERN_PROC2
+#ifdef KERN_PROC
 	int mib [6];
-	size_t data_len = sizeof (struct kinfo_proc2);
-	struct kinfo_proc2 processi;
+	size_t data_len = sizeof (struct kinfo_proc);
+	struct kinfo_proc processi;
 #else
 	int mib [4];
 	size_t data_len = sizeof (struct kinfo_proc);
 	struct kinfo_proc processi;
-#endif /* KERN_PROC2 */
+#endif /* KERN_PROC */
 
 	memset (buf, 0, len);
 
-#ifdef KERN_PROC2
+#ifdef KERN_PROC
 	mib [0] = CTL_KERN;
-	mib [1] = KERN_PROC2;
+	mib [1] = KERN_PROC;
 	mib [2] = KERN_PROC_PID;
 	mib [3] = GPOINTER_TO_UINT (pid);
-	mib [4] = sizeof(struct kinfo_proc2);
+	mib [4] = sizeof(struct kinfo_proc);
 	mib [5] = 400; /* XXX */
 
 	res = sysctl (mib, 6, &processi, &data_len, NULL, 0);
 
-	if (res < 0 || data_len != sizeof (struct kinfo_proc2)) {
+	if (res < 0 || data_len != sizeof (struct kinfo_proc)) {
 		return buf;
 	}
 #else
@@ -248,7 +248,7 @@ mono_process_get_name (gpointer pid, char *buf, int le
 	if (res < 0 || data_len != sizeof (struct kinfo_proc)) {
 		return buf;
 	}
-#endif /* KERN_PROC2 */
+#endif /* KERN_PROC */
 	strncpy (buf, processi.kinfo_name_member, len - 1);
 	return buf;
 #else
